<?php
class universityController extends appController {    
    public function index($id=null, $name=null, $country_id=null){
        $create_date = time();
        $modified = time();
        if($_SERVER["REQUEST_METHOD"]=='POST'){
            // print_r($_POST);exit;
            $error = $this->_model->validation();
            if($error){
                       $this->view->set('err',$error);
                }
                $id = $this->_model->universityname($id,$create_date,$modified,$name,$country_id);

                if($id != null){
                    header('Location: index');
                    exit;
                }
        }
       $getuniverName = $this->loadModel("courseModel");
        $getsubject=$getuniverName->getuniverName();
        // print_r($getsubject);exit;
        $this->view->set('getsubject',$getsubject[0]);
        $getCountry = $this->_model->getCountry();
        $this->view->set('getCountry',$getCountry);

        // echo "<pre>";print_r($getCountry);
        return $this->view();
    }

}
?>